1. Technical Field
The present invention relates to network interfacing and more particularly, to methods and systems or determining data availability for data transmitted over a network and stored in a buffer memory.
2. Background Art
Network interface devices handle packets of data for transmission between a host computer and a network communications system, such as a local area network. The host computer may be implemented as a client station, a server, or a switched hub. One primary function of the network interface device is to buffer data to compensate for timing discrepancies between the clock domain of the host computer and the clock domain of the network.
Network interface devices typically include a first in, first out (FIFO) buffer memory for storing transmit and receive data, where the transmit data is stored in a transmit FIFO prior to transmission on the network media by a Media Access Controller (MAC), and receive data is stored in a receive FIFO by the MAC prior to transfer to the host computer via a host computer bus interface.
One disadvantage with the use of a FIFO for a transmit buffer or a receive buffer of a network interface device is the high latency encountered during the buffering process. The latency of the network interface device is the time delay between the time that a data frame is supplied to the network interface device and the time the data is transmitted on the network media, or vice versa.
An additional disadvantage with the use of a FIFO for a transmit or receive buffer is the lack of flexibility in reading data. For example, when a host device wishes to read a data frame stored in a receive FIFO, there is no way of determining whether the entire frame has been stored. In situations where the entire data frame has not been stored, the time that the host device spends accessing the receive FIFO and reading a partial frame could be more efficiently spent performing other tasks and the host device could access the receive FIFO after a complete frame has been stored.
There is a need for an arrangement that enables the use of a random access memory in a network controller, as opposed to a FIFO buffer, to store a data frame and to provide flexibility in reading the data frame.
There is also a need for a method of determining the amount of data available to be read from the oldest received frame stored in a random access memory in a network controller.
These and other needs are met by the present invention, where a network interface device includes a random access memory for storing data frames. The network interface device includes a memory controller that determines the amount of data available to be read from the oldest received frame that is available to be read.
According to one aspect of the invention, a network interface device is provided for buffering data. The network interface device includes a random access memory configured to store a plurality of frames. The network interface device also includes a control device configured to determine an amount of data available to be read from an oldest received frame of the plurality of frames.
Another aspect of the present invention provides a method for determining data availability of data stored in a network interface device. The method includes receiving a plurality of data frames and storing the frames into a random access memory. The method also includes generating a value representing an amount of data from an oldest received frame of the plurality of frames available to be read.
Additional advantages and features of the present invention will be set forth in part in the description which follows, and in part will become apparent to those skilled in the art upon examination of the following or may be learned by practice of the invention. The advantages of the invention may be realized and attained by means of the instrumentalities and combinations particularly pointed out in the appended claims.